<BR><table border="1" cellpadding="0" cellspacing="0"    >
   <tr class="b">
      <td width= "60" > lon  </td>
      <td width= "60" > lat </td>
      <td width= "90" > name </td>
      <td width= "95" > opis</td>
      <td width= "75" > kategoria</td>
   </tr>
   <?php
global $database;
/*	$database->query("SELECT points . * , cat.name AS cname
           FROM points LEFT JOIN cat
           ON points.id_cat = cat.id");
  */
   $database->query("SELECT points . * , cat.name AS cname, ucat.name AS uname
           FROM (points LEFT JOIN cat
           ON points.id_cat = cat.id )
LEFT JOIN ucat ON cat.id_ucat = ucat.id");

   while ($r=mysql_fetch_array($database->result))
   {
      echo '<tr> <td  >'.$r['lon'].'</td> <td  >'.$r['lat'].'</td> <td  >'. $r['name'].'</td>
                  <td width= "80" >'. $r['desc'].'</td>
                  <td  >'. $r['cname'].' /'.$r['uname']. '</td>';
      echo '</tr>';
   }
   ?>
</table>